package com.lieve.tx.typeinfo;

import static com.lieve.tx.util.Print.print;

/**
 * @author sunyoboy
 * 2020/9/25
 */

class Candy {
    static {
        print("Loading Candy");
    }
}

class Gum {
    static {
        print("Loading Gum");
    }
}

class Cookie {
    static {
        print("Loading Cookie");
    }
}

public class SweetShop {
    public static void main(String[] args) {
        print("inside main");
        new Candy();
        print("after create candy");
        try {
            Class.forName("com.lieve.tx.typeinfo.Gum");
        } catch (ClassNotFoundException e) {
            print("can't find Gum");
        }
        print("after Class.forName(\"Gum\")");
        new Cookie();
        print("after create Cookie");
    }
}
